package com.tencent.sr.iris.activity.service.config;

import com.google.common.collect.Lists;
import com.tencent.sr.iris.activity.common.util.TimeUtils;
import com.tencent.sr.tech.dynamic.config.spring.annotation.DynamicConfigObject;
import java.util.Date;
import java.util.List;
import lombok.Data;
import org.springframework.stereotype.Component;

/**
 * 邀请有临时配置
 *
 * @author xiaojun
 */
@Data
@Component
@DynamicConfigObject(key = "inviteGiftTempConfig")
public class InviteGiftTempConfig {

    /**
     * 4月邀请有礼任务白名单配置
     */
    public List<String> uidWhiteList = Lists.newArrayList();

    /**
     * 白名单失效时间
     */
    public String expireTime = "2023-07-01 00:00:00";

    /**
     * 邀请有礼策略调整时间
     */
    public String changeTime = "2023-06-21 00:00:00";

    /**
     * 邀请有礼上限策略调整时间
     */
    public String upperLimitChangeTime = "2023-07-01 00:00:00";

    public Date getExpireTime() {
        return TimeUtils.parse(this.expireTime);
    }

    public Date getInviteGiftChangeTime() {
        return TimeUtils.parse(this.changeTime);
    }

    public Date getInviteGiftUpperLimitChangeTime() {
        return TimeUtils.parse(this.upperLimitChangeTime);
    }
}
